

import { request} from '@/utils/request.util';
import type {Response}from '@/types/common';
import type {Res} from '@/types/root'
import type {OrderReqTable,AddReq,OrderReqDetail} from '@/types/req/index';
//查询领用单列表
export const getOrderReqList = (body:{
  pageNo: number,
  pageSize: number,
  orderNo?: any,
  orderStatus?: any,
  deptId?: any,
  storageId?: any,
})=> request.get<OrderReqTable>("/stock/order/getOrderReqList",{params:body}); 


//添加领用单
export const addReq = (body:AddReq)=> request.post<Response<Res>>("/stock/order/addReq",body);

//查询领用单详情
export const getOrderReqDetail = (orderId: number)=> request.get<OrderReqDetail>("/stock/order/getOrderReqDetail",{params:{orderId}});

//审核领用单 
export const auditReq = (body:{
  orderId: number,
  orderStatus: string,
  refuseReason?: any,
})=> request.post<Response<Res>>("/stock/order/reviewReq",body);
